package com.flexattack
{
	import org.puremvc.as3.interfaces.IFacade;
	import org.puremvc.as3.patterns.facade.Facade;
	import com.flexattack.controler.*;
	import com.flexattack.model.*;
	import com.flexattack.view.*;
	public final class ApplicationFacade extends Facade implements IFacade
	{
		//contant names for Notifacations
		public static const STARTUP:String = "startup";
		public static const LOGIN:String = "login";
		
		//Singleton factory method
		public static function getInstance():ApplicationFacade
		{
			if (instance==null) instance = new ApplicationFacade;
			return instance as ApplicationFacade;
		}
		//Register Command with the help of Contriller
		override protected function initializeController():void
		{
			super.initializeController();
			registerCommand(STARTUP,StartupCommand);
		}
		//Running PureMVC
		public function startup(app:PAttack):void
		{
			sendNotification(STARTUP,app);
		}
	}
}